import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Collection;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-06-03
 * Time: 9:46
 */
public class Main {
    public static void main(String[] args) throws SQLException {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请选择你要进行的操作:");
        System.out.println("1.插入数据");
        System.out.println("2.删除数据");
        System.out.println("3.更新数据");
        System.out.println("4.查询数据");
        int input = scanner.nextInt();
        Option option;
        switch (input) {
            case 1:
                option = new Insert();
                option.function();
                break;
            case 2:
                option = new Delete();
                option.function();
                break;
            case 3:
                option = new Update();
                option.function();
                break;
            case 4:
                option = new Select();
                option.function();
                break;
            default:
                System.out.println("输入错误");
                break;
        }
    }
}
